4e07546
@@ -101,7 +101,8 @@
public void process(Object row, int tag) throws HiveException {
       // Are we consuming too much memory
       if (alias == numAliases - 1 && !(handleSkewJoin && skewJoinKeyContext.currBigKeyTag >= 0) &&
           !hasLeftSemiJoin) {
-        if (sz == joinEmitInterval && !hasFilter(alias)) {
+        if (sz == joinEmitInterval && !hasFilter(condn[alias-1].getLeft()) &&
+                !hasFilter(condn[alias-1].getRight())) {
           // The input is sorted by alias, so if we are already in the last join
           // operand,
           // we can emit some results now.
